Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sha256: Use standard types uint8_t / uint32_t so types doesn't have to be adjusted manually #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danmar
Copy link

@danmar danmar commented May 17, 2018

This makes the code more portable. you can use the same code both on a pc and on a embedded system.

if you do not like to use uint8_t and uint32_t for some reason then I would suggest that we use preprocessor to select proper types. Something like:

#if sizeof(int) == 4
typedef unsigned int WORD;
elif sizeof(long) == 4
typedef unsigned long WORD;
#else
#error WORD type not configured properly
#endif

@DeflateAwning
Copy link

Please merge this PR. This is a good change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants